package P2分治回溯;

public class RecursionDemo02 {
    public static void main(String[] args) {
        int result = f(100);
        System.out.println(result);
    }

    private static int f(int i) {
        if (i == 1) {
            return 1;
        }
        return f(i - 1) + i;
    }
}